<table width="100%" border="0"  class="header">
      <tr>
        <td width="3%">&nbsp;</td>
		<td width="33%">
			<span class="boldGrey">
				Welcome! 
<?php 
 $sqlCartCount="select * from tempcart where session_id='".$sessid."'";
 $resCartCount=mysql_query($sqlCartCount);
 $nrowCart=mysql_num_rows($resCartCount);
 
if($_SESSION['user_id_sess']!="") {
$sellflag=0;
$sqluser="select tbl_businesstype.sellflag from tbl_users,tbl_businesstype where user_id='".$_SESSION['user_id_sess']."' and status='1' and tbl_users.bus_id=tbl_businesstype.bus_id";
$resuser=mysql_query($sqluser);
$Rowuser=mysql_fetch_array($resuser);

$sellflag=$Rowuser['sellflag'];




$sqlMsg="select * from tbl_messages where recieverid='".$_SESSION['user_id_sess']."' and status='1'";
$resMsg=mysql_query($sqlMsg);
$nRowmsg=mysql_num_rows($resMsg);
						echo ucfirst($_SESSION['user_name']);
						echo "&nbsp; &nbsp;<a href='index.php?signout'>Sign out</a> <a href='index.php?inbox'><img src=images/message-icon.png border=0 title=Inbox> (".$nRowmsg.")</a>";  
					} else { ?>  
						<a href="index.php?signin" onclick="return tracking('Sign In');">Sign In</a> 
						or 
						<a href="index.php?signup" onclick="return tracking('Register');">Register</a>
					<?php } ?>	
	    </span>		</td>
        <td width="24%" align="right" valign="top"><span class="boldGrey"><a href="index.php?cart">To View Cart (<?php echo $nrowCart;?>) items</a></span></td>
        <td width="40%" align="right"><span class="boldGrey">
        <a href="index.php" onclick="return tracking('Home');">Home</a>&nbsp;|&nbsp;
         <?php if($_SESSION['user_status']!="3")
		{
		if(isset($_GET['products']))
		 $StyleClass="style='color:#FF8000'";
		 else
		  $StyleClass="";
		  if($sellflag!=1)
		  {
		?>
        <a href="index.php?products" <?php echo $StyleClass; ?> onclick="return tracking('Buy');">Buy</a>&nbsp;|&nbsp; 
        <?php
		  }
		if(isset($_GET['sell']))
		 $StyleClass="style='color:#FF8000'";
		 else
		  $StyleClass="";
		  if($sellflag!=1)
		  {
		  ?>
        <a href="index.php?sell&by=seller" <?php echo $StyleClass; ?> onclick="return tracking('Sell');">Sell</a>&nbsp;|&nbsp;
		 <?php
		  }
		if(isset($_GET['post']))
		 $StyleClass="style='color:#FF8000'";
		 else
		  $StyleClass="";
		  ?>
		<a href="index.php?post" <?php echo $StyleClass; ?> onclick="return tracking('Post');">Post</a>&nbsp;|&nbsp; 
        <?php
		}
		?>
        <?php
		if($_SESSION['user_type_sess']==1)
		{
		if(isset($_GET['wlist']))
		 $StyleClass="style='color:#FF8000'";
		 else
		  $StyleClass="";
		  ?>
        <a href="index.php?wlist" <?php echo $StyleClass; ?> onclick="return tracking('Wishlist');">Wishlist</a>&nbsp;|&nbsp; 
        <?php
		 }
		 if($_SESSION['user_id_sess']!="")
		{
		?>
        
        <?php
		if(isset($_GET['mySwapen']))
		 $StyleClass="style='color:#FF8000'";
		 else
		  $StyleClass="";
		  ?>
        <a href="index.php?mySwapen" <?php echo $StyleClass; ?> onclick="return tracking('My Swapen');">My Swapen</a>&nbsp;|&nbsp;
		<a href="index.php?refer" <?php echo $StyleClass; ?> onclick="return tracking('Refer');">Refer</a>&nbsp;|&nbsp;
        <?php
		if(isset($_GET['profile']) || isset($_GET['viewpro']))
		 $StyleClass="style='color:#FF8000'";
		 else
		  $StyleClass="";
		  ?>
        <a href="index.php?profile" <?php echo $StyleClass; ?> onclick="return tracking('Profile');">Profile</a>&nbsp;
        <? } ?>
        </span></td>
  </tr>
      
      <tr>
        <td height="113" colspan="2"><a href='index.php' onclick="return tracking('Logo');"><img src="images/logo.gif" alt="Swapen" border="0"/></a></td>
        <td colspan="2" align="right"><?php require_once 'tabs.php'; ?></td>
      </tr>
    </table>
